<!DOCTYPE html>
<html lang="zh">
	<head>
		<meta charset="UTF-8">
		<title></title>
		<script type="text/javascript" src="../js/jquery-1.12.4.js" ></script>
	</head>
	<body>
		
		<select id="prov">
			<option>请选择</option>
		</select>
		<select id="city">
			<option>请选择</option>
		</select>
		
		<script type="text/javascript">
			var cities = new Array();
			cities['湖北'] = new Array("武汉市","黄冈市","襄阳市","荆州市");
			cities['湖南'] = new Array("长沙市","郴州市","株洲市","岳阳市");
			cities['河北'] = new Array("石家庄市","邯郸市","廊坊市","保定市");
			cities['河南'] = new Array("郑州市","洛阳市","开封市","安阳市");
			
			for(var i in cities){
				$("#prov").append("<option>"+i+"</option>");
			}
			$("#prov").change(function(){
					var cityArr=cities[$(this).val()];
					$("#city").empty();
					for(var j=0;j<cityArr.length;j++){
						$("#city").append("<option>"+cityArr[j]+"</option>");
					}
			});
			
			
		</script>
	</body>
</html>
